package org.example.events;

import org.example.events.Constants;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

public class EventsData extends SQLiteOpenHelper {
	private static final String DATABASE_NAME = "events.db";
	private static final int DATABASE_VERSION = 1;

	public EventsData(Context context) {
		super(context, DATABASE_NAME, null, DATABASE_VERSION);
		// TODO Auto-generated constructor stub
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		// TODO Auto-generated method stub
		db.execSQL("");
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		// TODO Auto-generated method stub
		db.execSQL("CREATE TABLE " + Constants.TABLE_NAME 
				 + "(" 
				 + Constants._ID + " INTEGER PRIMARY KEY AUTOINCREMENT, "
				 + Constants.TIME + " INTEGER, "
				 + Constants.TITLE + " TEXT NOT NULL"
				 + ");");
		onCreate(db);
	}

}
